{
                // Handle assignment: left = right
                // This should be treated as a statement, not an expression
                // For now, we'll handle simple variable assignments
                match &*binary.left {
                    Expression::Variable(var_name) => {
                        if let Some(var_alloca) = self.variable_map.get(var_name).cloned() {
                            if var_alloca.is_pointer_value() {
                                let _ = self
                                    .builder
                                    .build_store(var_alloca.into_pointer_value(), right);
                                Ok(right) // Return the assigned value
                            } else {
                                Err(CompilerError::internal("Variable is not a pointer"))
                            }
                        } else {
                            Err(CompilerError::internal(&format!(
                                "Undefined variable: {}",
                                var_name
                            )))
                        }
                    }
                    Expression::FieldAccess(field_access) => {
                        // Handle field assignment like self.name = new_name
                        let field_name = &field_access.field;

                        // Get the object pointer directly from variable_map
                        let object_ptr = match &*field_access.object {
                            Expression::Variable(var_name) => {
                                if let Some(var_value) = self.variable_map.get(var_name) {
                                    if var_value.is_pointer_value() {
                                        var_value.into_pointer_value()
                                    } else {
                                        return Err(CompilerError::internal(
                                            "Object is not a pointer",
                                        ));
                                    }
                                } else {
                                    return Err(CompilerError::internal(&format!(
                                        "Undefined variable: {}",
                                        var_name
                                    )));
                                }
                            }
                            _ => {
                                return Err(CompilerError::internal(
                                    "Only variable field access supported in assignment",
                                ));
                            }
                        };

                        let struct_decl_opt =
                            self.resolve_struct_for_field_access(&field_access.object, field_name);

                        // Get the field pointer
                        let struct_type = if let Some(struct_decl) = struct_decl_opt {
                                // Generate LLVM types for each field
                                let mut field_types = Vec::new();
                                for field in &struct_decl.fields {
                                    let field_llvm_type = self
                                        .nrc_type_to_llvm_type(&Some(field.field_type.clone()))?;
                                    field_types.push(field_llvm_type.into());
                                }
                                self.context.struct_type(&field_types, false)
                            } else {
                                // Fallback to hardcoded type if struct declaration not found
                                self.context.struct_type(
                                    &[
                                        self.context
                                            .i8_type()
                                            .ptr_type(inkwell::AddressSpace::default())
                                            .into(), // name field (string)
                                        self.context.i32_type().into(), // age field (int)
                                    ],
                                    false,
                                )
                            };

                        let field_index = if let Some(struct_decl) = struct_decl_opt {
                                // Find the field index by name
                                struct_decl
                                    .fields
                                    .iter()
                                    .position(|field| field.name == *field_name)
                                    .ok_or_else(|| {
                                        CompilerError::internal(&format!(
                                            "Unknown field: {}",
                                            field_name
                                        ))
                                    })?
                            } else {
                                // Fallback to hardcoded mapping if struct declaration not found
                                match field_name.as_str() {
                                    "name" => 0,
                                    "age" => 1,
                                    _ => {
                                        return Err(CompilerError::internal(&format!(
                                            "Unknown field: {}",
                                            field_name
                                        )))
                                    }
                                }
                            };
                        let field_ptr = self.builder.build_struct_gep(
                            struct_type,
                            object_ptr,
                            field_index as u32,
                            field_name,
                        )?;

                        // Store the new value to the field
                        let _ = self.builder.build_store(field_ptr, right);
                        Ok(right) // Return the assigned value
                    }
                    _ => Err(CompilerError::internal(
                        "Unsupported assignment target in binary expression",
                    )),
                }
            }
